@extends('admin.common.main')

@section('content')
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 房源属性中心 <span
            class="c-gray en">&gt;</span> 房源属性管理 <a class="btn btn-success radius r"
                                                    style="line-height:1.6em;margin-top:3px"
                                                    href="javascript:location.replace(location.href);" title="刷新"><i
                class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="page-container">
        <form action="{{route('admin.fang_attr.index')}}" method="get">
            <div class="text-c"> 房东名称：
                <input type="text" class="input-text" style="width:250px" placeholder="输入房东名称" id=""
                       name="name">
                <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜房东
                </button>
            </div>
        </form>
        <div class="cl pd-5 bg-1 bk-gray mt-20"><span class="l"><a href="javascript:;" onclick="datadel()"
                                                                   class="btn btn-danger radius"><i
                        class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
                <a href="{{route('admin.fang_owner.create')}}" class="btn btn-primary radius"><i
                        class="Hui-iconfont">&#xe600;</i> 添加新房东</a></span>
            <span class="r">共有数据：<strong>88</strong> 条</span>
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                <tr class="text-c">
                    <th width="25"><input type="checkbox"></th>
                    <th width="80">ID</th>
                    <th width="100">房东性名</th>
                    <th width="50">性别</th>
                    <th width="50">年龄</th>
                    <th width="100">手机号</th>
                    <th width="200">身份证号</th>
                    <th width="200">身份证照片</th>
                    <th width="130">加入时间</th>
                    <th width="100">操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data as $key=>$val)
                    <tr class="text-c">
                        <td><input type="checkbox" value="{{$val['id']}}" name="id[]"></td>
                        <td>{{$val['id']}}</td>
                        <td style="text-align: left">{{$val['name']}}</td>
                        <td>@if($val['sex']==1)男@else女@endif</td>
                        <td>{{$val['age']}}</td>
                        <td>{{$val['phone']}}</td>
                        <td>{{$val['card']}}</td>
                        <td><img src="{{$val['pic']}}" width="50px" alt=""></td>
                        <td>{{$val['created_at']}}</td>
                        <td class="td-manage">
                            <a title="编辑" href="{{route('admin.fang_owner.edit',$val)}}" class="label label-primary radius">编辑</a>
                            <a title="删除" href="{{route('admin.fang_owner.destroy',['id'=>$val['id']])}}"
                               class="label label-danger radius delbtn">删除</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

@endsection

@section('js')
@endsection
